#define _CRT_SECURE_NO_WARNINGS 2

#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#include<assert.h>

typedef struct Heap {
	int  capacity;
	int size;
	int* arr;
}Heap;

void HeapInit(Heap* php);
void HeapDestroy(Heap* php);
void HeapAdd(Heap* php, int x);
void HeapAdjustUp(int* arr,  int n);
void HeapPop(Heap* php);
void HeapAdjustDown(int* arr, int parent, int n);
bool HeapEmpty(Heap* php);
void CreateHeapDown(int* arr, int n);
void HeapSort(int* arr, int n);
void CreateHeapUp(int* arr, int n);
int HeapSize(Heap* php);


